package com.leeon.container;

import java.util.ArrayList;
import java.util.Random;

public class Gobil {

    private  int number;

    public Gobil(int num){
        this.number = num;
    }

    public void hop(){
        System.out.println("num = " + this.number + " location = ");
    }

    public static void main(String[] args){

        ArrayList<Gobil> gobils = new ArrayList<Gobil>();

        for (int i = 0; i < 10;i++){
            gobils.add(new Gobil(i));
        }

        for (Gobil g : gobils) {
            g.hop();
        }
    }

}
